<?php get_backend_header(array(
	'jquery/validate/jquery.validate.js',
        'jquery/validate/additional-methods.js',
	'exam.js',
), array(
	'jquery/ui.jqgrid.css'
)); ?>

    <h2 class="title"><?php echo $exam['exam_name'] ?> -  Score Details</h2>

    <div id="score_details" name="score_details" class="form exam">
            <input type="hidden" id="exam_id" name="exam_id" value="<?php echo $exam['exam_id']; ?>" />
            <input type="hidden" id="user_id" name="user_id" value="<?php echo $user['user_id']; ?>" />
            <div id ="print_friendly">
                <div class="unit">
                    <div class="line">
                            <label for="" class="bold">Name:</label>
                            <div class="field" style="height:auto">
                              <?php echo $user['fname'].' '.$user['mname'].' '.$user['lname']; ?>
                            </div>
                    </div>
                    <div class="line">
                            <label for="" class="bold">Exam Name:</label>
                            <div class="field" style="height:auto">
                              <?php echo $exam['exam_name']; ?>
                            </div>
                    </div>
                </div>

                <div class ="clear"></div>

                <div class="unit" id="score">
                    <div class="line">
                        <label class="bold clear" for="score">Score: <span id ="actual_score"><?php echo $score['actual_score'] ?></span>/<span id ="total_score"><?php echo $score['over_score'] ?></span></label>
                    </div>
                </div>

                <div class="clear"></div>
                <?php
                    $i = 1;
                ?>
                <div class="unit">
                    <?php foreach($score_details as $sd) { ?>
                        <div class="line">
                                <label for="" class="bold"><?php echo $i ?>. Exam Type:</label>
                                <div class="field" style="">
                                  <?php echo $sd['exam_type'] ?>
                                </div>
                        </div>
                        <div class="line">
                                <label for="" class="bold">Question:</label>
                                <div class="field" style="">
                                  <?php echo $sd['question'] ?>
                                </div>
                        </div>
                        <div class="line">
                                <label for="" class="bold">Answer:</label>
                                <div class="field" style="">
                                  <?php echo $sd['answer'] ?>
                                </div>
                        </div>
                        <div class="line">
                                <label for="" class="bold">Remark:</label>
                                <div class="field" style="">
                                  <?php echo $sd['remark'] ?>

                                </div>
                        </div>
                        <hr />
                    <?php
                    $i++;
                    } ?>
                </div>

                <div class ="clear"></div>
            </div>

            <div class="buttons">
                <a name="cancel" id="cancel" href="<?php echo site_url('score/view_score/'.$exam_group['groups_group_id'].'/'.$exam_group['exams_exam_id']) ?>">Back</a>
                <button id="print" name="print">Printer Friendly Version</button>
            </div>
    </div>
    

<script type="text/javascript">
        $('#print').button().click(function(e){
            e.preventDefault();

            var objData = {
                exam_id: $('#exam_id').val()
            }

            printerFriendly('score', 'print_score_detail', objData)
        });

        $('#cancel').button({
		icons: {primary: 'ui-icon-arrowreturn-1-w'}
	});

</script>

<?php get_backend_footer(); ?>
